package cn.edu.xmu.oomall.customer.microservice;

import cn.edu.xmu.oomall.customer.microservice.vo.ProductRetVo;
import cn.edu.xmu.privilegegateway.annotation.util.InternalReturnObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Jiawei Zheng
 * @date 2021-12-04
 */
@FeignClient(name = "goods-service")
public interface GoodsService {

    /**
     * 根据productId获取货品详细信息
     * @param id
     * @return
     */
    @GetMapping("/products/{id}")
    InternalReturnObject<ProductRetVo> getProductDetails(@RequestParam @PathVariable Long id);
}
